import  type {App} from 'vue'
import {useUserInfoStore} from '@/stores/userInfo'
  // 自定义的插件
  function hasBtnPermission(app:App){
    app.directive('has',{
      mounted(node,bindings){
        if(!useUserInfoStore().userInfo.buttons.includes(bindings.value)){
          node.parentNode.removeChild(node)
        }
      }
    })
  }

  export default hasBtnPermission

